{% extends "projetPHPidkdoBundle::layout.html.twig" %}

{% block title %}{{ parent() }} - Resultats de la recherche{% endblock %}
	
{% block body %}
    <h2> Recherche avancée</h2>
    
	<form method="post" action="{{ path('projetPHPidkdoBundle_recherche') }}">
		<table width="80%" border="0">
			<tr>
				<td>Nom / Nom partiel</td>
				<td><input name="titre" type="text" /></td>
			</tr>
			<tr>
				<td>Offert par</td>
				<td><select name="id_offrant">
					<option value=""></option>
					{% for v_personne in liste_personnes %}
						<option value="{{ v_personne.id }}"> {{ v_personne.type }}</option>
					{% endfor %}
				</select></td>
			</tr>
			<tr>
				<td>Reçu par</td>
				<td><select name="id_receveur">
					<option value=""></option>
					{% for v_personne in liste_personnes %}
						<option value="{{ v_personne.id }}"> {{ v_personne.type }}</option>
					{% endfor %}
				</select></td>
			</tr>
			<tr>
				<td>Occasion</td>
				<td><select name="id_occasion">
					<option value=""></option>
					{% for v_occasion in liste_occasions %}
						<option value="{{ v_occasion.id }}"> {{ v_occasion.nom }}</option>
					{% endfor %}
					</select></td>
			</tr>
			<tr>
				<td>Genres</td>
				<td><ul class="unstyled">
				{% for v_genre in liste_genres %}
					<li><input name="genres[]" value="{{ v_genre.id }}" type="checkbox" /> {{ v_genre.nom }}</li>
				{% endfor %}
				</ul></td>
			</tr>
			<tr>
				<td>Evaluation</td>
				<td><select name="opp">
					<option value=""></option>
					<option value="=">Egale à</option>
					<option value=">=">Supérieure ou égale à</option>
					<option value="<=">Inférieure ou égale à</option>
					</select>
				<select name="note">
					<option value=""></option>
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
					</select></td>
			</tr>
			<tr>
				<td></td>
				<td><button class="btn" type="submit" ><i class="icon-search"></i>Chercher</button></td>
			</tr>
		</table>
	</form>

{% endblock %}